package com.soft.base.enums;
/**
 * class
 *
 * @author user
 * @date 2020/06/05
 */
public enum SortEnum implements ValueNameEnum<String> {

    /**
     *
     */
    TOP("top", "顶部"),
    /**
     *
     */
    BOTTOM("bottom", "底部"),
    /**
     *
     */
    UP("up", "向上"),
    /**
     *
     */
    DOWN("down", "向下");

    private String value;
    private String name;

    SortEnum(String value, String name) {
        this.value = value;
        this.name = name;
    }

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public String getName() {
        return name;
    }

    public static SortEnum of(String value) {
        for (SortEnum sortEnum : SortEnum.values()) {
            if (sortEnum.getValue().equals(value)) {
                return sortEnum;
            }
        }
        return null;
    }
}
